From d983fecb90575eb829bb6434c8969fd446d6a197 Mon Sep 17 00:00:00 2001 From: robertl Date: Fri, 26 Aug 2005 17:52:58 +0000 Subject: [PATCH] Misc cleanups for valgrind. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@1369 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/hsa_ndv.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gpsbabel/hsa_ndv.c b/gpsbabel/hsa_ndv.c index eb2bd78d4..9fb6a73a7 100644 --- a/gpsbabel/hsa_ndv.c +++ b/gpsbabel/hsa_ndv.c @@ -377,9 +377,9 @@ void readVersion4( FILE* pFile) { while( TRUE ) { - char recData[256]; + char recData[256] = {0}; // get the position - double lat2, lng2; + double lat2, lng2 = 0; // set the pointer to the time stamp depending // on whether we have a sounding array or not @@ -393,7 +393,7 @@ void readVersion4( FILE* pFile) char attr[1024]; int Vertex; - memset(attr, 0, 1024); + memset(attr, 0, sizeof(attr)); wpt_tmp = xcalloc(sizeof(*wpt_tmp), 1); wpt_tmp->altitude = unknown_alt; @@ -521,7 +521,8 @@ int readPositionRecord( FILE* pFile, double* lat, double* lng, long* timeStamp) { // read the lat record - char recData[256]; + char recData[256] = {0}; + if( !readRecord( pFile, EF_LAT_REC, recData) ) // no lat record then finished return FALSE; -- 2.30.2